/***************************************************************
*  Copyright (c) 2007 by GroupMe! Team (www.groupme.net)
*  All rights reserved.
*
*  This file is part of the GroupMe! Project. Source code of 
*  this project is closed and redistribution of this code is
*  prohibited. 
*  
*  Contact: http://www.groupme.net
*
*  This copyright notice MUST APPEAR in all copies of the file!
***************************************************************/
package net.groupme.controller.model;

/**
 * created on Jun 25, 2007
 * 
 * Model object for results of a common <i>Search for Resources</i>.
 * 
 * @author Fabian Abel, <a href="mailto:abel@l3s.de">abel@l3s.de</a>
 * @author last edited by: $Author: fabian $
 * 
 * @version $Revision: 1.4 $ $Date: 2007-06-27 00:10:58 $
 */
public class SearchResult {

	//attributes:
	/** kind of temporal id */
	private String resultID = null;
	
	/** name or title of the result */
	private String name = null;
	
	/** URL of the resource */
	private String url = null;
	
	/** (optional) short description of the resource */
	private String description = null;
	
	/** general type of resource (not rdf:type but something like photo, video, rss-feed,...) */
	private String type = null;

	/**
	 * Creates a new empty SearchResult instance. 
	 */
	public SearchResult() {
		super();
	}

	/**
	 * Creates a new SearchResult instance.
	 * @param resultID temporal id of the search result
	 * @param name the name/title of the search result
	 * @param url URL of the resource
	 * @param description (optional) short description of the resource
	 * @param type general type of resource (not rdf:type but something like photo, video, rss-feed,...)
	 */
	public SearchResult(String resultID, String name, String url, String description, String type) {
		super();
		this.resultID = resultID;
		this.name = name;
		this.url = url;
		this.description = description;
		this.type = type;
	}


	/**
	 * This method returns the resultID of a SearchResult object.
	 * @return the resultID
	 */
	public String getResultID() {
		return resultID;
	}

	/**
	 * This method sets the resultID of a SearchResult object.
	 * @param resultID the resultID to set
	 */
	public void setResultID(String resultID) {
		this.resultID = resultID;
	}

	/**
	 * This method returns the description of a SearchResult object.
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * This method sets the description of a SearchResult object.
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * This method returns the name of a SearchResult object.
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * This method sets the name of a SearchResult object.
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * This method returns the url of a SearchResult object.
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * This method sets the url of a SearchResult object.
	 * @param url the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * This method returns the type of a SearchResult object.
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * This method sets the type of a SearchResult object.
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "## resultID: " + resultID + ", name: " + name + ", " + " ##\ndescription: " + description + ", type: " + type + "\nURL: " + url;
	}
}
